package com.kkd.kkdapp.base;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Toast;

import com.kkd.kkdapp.utils.AppUtil;
import com.kkd.kkdapp.utils.LogUtil;
import com.umeng.analytics.MobclickAgent;

/**
 * Fragment基本内容
 * 
 * @author
 */
public abstract class BaseFragment extends Fragment{

	Toast mToast;
	@Override
	public void onResume() {
		super.onResume();
		if (mToast != null) {
			mToast.cancel();
			mToast = null;
		}
	}

	@Override
	public void onPause() {
		super.onPause();
	}


	@Override
	public void onDestroy() {
		super.onDestroy();
		if (mToast != null) {
			mToast.cancel();
			mToast = null;
		}
		AppUtil.closeDialog();
	}

	public void showToast(Activity acitivity, String hintLanguage) {
		AppUtil.makeToastForCustomer(acitivity, hintLanguage);
	}

	public void showToast(int hintLanguage) {
		AppUtil.makeToastForCustomer(getActivity(), hintLanguage);
	}

}
